package com.pxr.service.impl;

import com.pxr.bean.UserInfoBean;
import com.pxr.dao.UserInfoBeanMapper;
import com.pxr.service.IUserService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserServiceImpl implements IUserService {
    // 依赖注入
    @Resource
    private UserInfoBeanMapper userInfoBeanMapper;

    @Override
    public boolean doLogin(UserInfoBean userInfoBean) {
        // 调用到层进行登录验证业务逻辑处理
        UserInfoBean userInfoBean1 = userInfoBeanMapper.doLogin(userInfoBean);
        System.out.println("mybatis查询结果：" + userInfoBean1);
        return userInfoBean != null;
    }

    public void setUserInfoBeanMapper(UserInfoBeanMapper userInfoBeanMapper) {
        this.userInfoBeanMapper = userInfoBeanMapper;
    }
}
